home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
DEMO_VGA
/
DEMOEGA1.LZH
/
KALEDIS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-06-07
|
3KB
|
105 lines
PROGRAM KALEDIS;
CONST
CX = 320;
CY = 175;
M = 175;
ESC = #27; { escape }
VAR
X1, Y1, X2, Y2, XV1, YV1, XV2, YV2, HC: INTEGER;
XA, YA, XB, YB: INTEGER;
CH: CHAR;
{$I EGA\GPPARMS.P }
{$I EGA\GPINIT.P }
{$I EGA\GPTERM.P }
{$I EGA\GPCOLOR.P }
{$I EGA\GPMOVE.P }
{$I EGA\GPLINE.P }
BEGIN
CLRSCR;
TEXTCOLOR(WHITE);
GOTOXY(27,06); WRITE('K A L E D I S C O P E');
GOTOXY(27,08); WRITE('for EGA with 128K/256K');
GOTOXY(28,10); WRITE('JudsON D. McClendoN');
GOTOXY(28,11); WRITE('844 Sun Valley Road');
GOTOXY(28,12); WRITE('Birmingham, AL 35215');
GOTOXY(32,13); WRITE('[74415,1003]');
GPPARMS;
IF GDTYPE <> 5 THEN
BEGIN
CLRSCR;
GOTOXY(28,15); WRITE('Enhanced Graphic Adaptor not found');
HALT(1);
END;
IF GDMEMORY < 128 THEN
BEGIN
CLRSCR;
GOTOXY(28,15); WRITE('Must have 128K or more EGA memory');
HALT(1)
END;
GOTOXY(27,15); WRITE ('Press "P" to pause,');
GOTOXY(27,16); WRITE ('Press ESCape to exit,');
GOTOXY(27,17); WRITE ('Press any key to begin/resume: ');
READ (KBD,CH);
IF CH = ESC THEN
HALT;
RANDOMIZE;
WHILE TRUE DO
BEGIN
GPINIT;
X1 := RANDOM(M);
X2 := RANDOM(M);
Y1 := RANDOM(X1+1);
Y2 := RANDOM(X2+1);
WHILE RANDOM > 0.01 DO
BEGIN
XV1 := RANDOM(11) - 5;
XV2 := RANDOM(11) - 5;
YV1 := RANDOM(11) - 5;
YV2 := RANDOM(11) - 5;
HC := RANDOM(1276) MOD 16;
GPCOLOR(HC);
WHILE RANDOM > 0.1 DO
BEGIN
XA := X1*9 DIV 5;
XB := X2*9 DIV 5;
YA := Y1*9 DIV 5;
YB := Y2*9 DIV 5;
GPMOVE( (CX+XA), (CY-Y1) ); GPLINE( (CX+XB), (CY-Y2) );
GPMOVE( (CX-YA), (CY+X1) ); GPLINE( (CX-YB), (CY+X2) );
GPMOVE( (CX-XA), (CY-Y1) ); GPLINE( (CX-XB), (CY-Y2) );
GPMOVE( (CX-YA), (CY-X1) ); GPLINE( (CX-YB), (CY-X2) );
GPMOVE( (CX-XA), (CY+Y1) ); GPLINE( (CX-XB), (CY+Y2) );
GPMOVE( (CX+YA), (CY-X1) ); GPLINE( (CX+YB), (CY-X2) );
GPMOVE( (CX+XA), (CY+Y1) ); GPLINE( (CX+XB), (CY+Y2) );
GPMOVE( (CX+YA), (CY+X1) ); GPLINE( (CX+YB), (CY+X2) );
X1 := (X1 + XV1) MOD M;
Y1 := (Y1 + YV1) MOD M;
X2 := (X2 + XV2) MOD M;
Y2 := (Y2 + YV2) MOD M;
END;
IF KEYPRESSED THEN
BEGIN
READ(KBD,CH);
IF UPCASE(CH) = 'P' THEN
READ(KBD,CH);
IF CH = ESC THEN
BEGIN
GPTERM;
HALT;
END;
END;
END;
END;
GPTERM;
END.